define(['app'], function(app) {
	'use strict';

	var controller = function controller($scope, Statistics_test) {
		
		//显示、隐藏
       $scope.isTable = true;
       $scope.isImage = false;
       $scope.changeTable = function(){
	       	$scope.isTable = true;
	       	$scope.isImage = false;
       }
        $scope.changeImage = function(){
	       	$scope.isTable = false;
	       	$scope.isImage = true;
       }
       
         //加载数据
        $scope.init_data=function(){
           Statistics_test.getlist('act_id','act_type',function(data){
              $scope.list=data;

           });
        }
        $scope.init_data();//必须在定义之后
        
	}

	controller.$inject = ['$scope', 'Statistics_test'];
	
	return app.registerController("statistics_testctrl",controller);
});